home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15731 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1010 b 

  1. Path: news.enterprise.net!usenet
  2. From: binlid@enterprise.net (Andrew Hindley)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can a function return a array of pointers? a.s.a.p.
  5. Date: Sun, 21 Apr 1996 13:33:28 GMT
  6. Organization: Enterprise PLC - Internet Services
  7. Message-ID: <4lde0r$s5r@news.enterprise.net>
  8. References: <4lalvn$536@badger.wmin.ac.uk>
  9. NNTP-Posting-Host: ppp130.enterprise.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Idoia Lertxundi <gsoec@wmin.ac.uk> wrote:
  13.  
  14. >My question is Can a function return a array of pointers? 
  15.  
  16. >It seems that the compiler does not like the following:
  17.  
  18. >static char[] *ReadCodes(FILE *fptr, char *codes_array_p[MAX_CODES], char
  19. >*codes[MAX_CODES])
  20.  
  21. >even [MAX_CODES] gives an error, therefore how can I represent a function
  22. >returning a type array of pointers?
  23.  
  24. >Answers to the group and me.
  25.  
  26. >gsoec@wmin.ac.uk
  27. >http://www.wmin.ac.uk/~gsoec/
  28.  
  29. I am pretty certain you can't. What I would do is to pass the address
  30. of the array of pointers and let the function work directly on it.
  31.  
  32.